using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using NetWorkMsg;

namespace NetMsg.Chat
{
    public struct GetSystemNoticeQ : IServerCallbackable
    {
        public int Version;
        
        public uint UnPackableId => 33;
        public uint PackableId => 53;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 53u);
            PackAuxiliary.Write(stream, (uint)Version);
        }
    }
    
    public class SystemNoticeInfo : IUnPackable
    {
        public string Notice;
        public int StartTime;
        public int EndTime;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out Notice);
            UnPackAuxiliary.Read(stream, out uint var0);
            StartTime = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            EndTime = (int)var1;
        }
    }
    
    public class GetSystemNoticeP : IUnPackable
    {
        public int Version;
        public List<SystemNoticeInfo> Infos;
        
        public const uint Sid = 33;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Version = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Infos = new List<SystemNoticeInfo>((int)var1);
            for(var i = 0; i < var1; ++i)
            {
                var var2 = new SystemNoticeInfo();
                var2.UnPack(stream);
                Infos.Add(var2);
            }
        }
    }
    
    public class NoticeNewNotieceP : IUnPackable
    {
        public SystemNoticeInfo Info;
        
        public const uint Sid = 34;
        
        public void UnPack(MemoryStream stream)
        {
            Info = new SystemNoticeInfo();
            Info.UnPack(stream);
        }
    }
    
    public class RoomChatInfo : IUnPackable
    {
        // 消息编号
        public int Number;
        public long PlayerId;
        public string Content;
        public int Time;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Number = (int)var0;
            UnPackAuxiliary.Read(stream, out ulong var1);
            PlayerId = (long)var1;
            UnPackAuxiliary.Read(stream, out Content);
            UnPackAuxiliary.Read(stream, out uint var2);
            Time = (int)var2;
        }
    }
    
    public class RoomSearchInfo : IUnPackable
    {
        public int RoomId;
        public int Head;
        public int Type;
        // 消失时间
        public int TimeStamp;
        public string Name;
        public BitVector32 Tags;
        // 宣言
        public string Describe;
        // 已有人数
        public int Has;
        // 人数上限
        public int Limit;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Head = (int)var1;
            UnPackAuxiliary.Read(stream, out uint var2);
            Type = (int)var2;
            UnPackAuxiliary.Read(stream, out uint var3);
            TimeStamp = (int)var3;
            UnPackAuxiliary.Read(stream, out Name);
            UnPackAuxiliary.Read(stream, out Tags);
            UnPackAuxiliary.Read(stream, out Describe);
            UnPackAuxiliary.Read(stream, out uint var4);
            Has = (int)var4;
            UnPackAuxiliary.Read(stream, out uint var5);
            Limit = (int)var5;
        }
    }
    
    // 拉取群聊天信息
    public struct GetRoomChatInfoQ : IServerCallbackable
    {
        public int RoomId;
        // 起始的消息Id
        public int StartId;
        // 查找的个数
        public int Number;
        
        public uint UnPackableId => 35;
        public uint PackableId => 54;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 54u);
            PackAuxiliary.Write(stream, (uint)RoomId);
            PackAuxiliary.Write(stream, (uint)StartId);
            PackAuxiliary.Write(stream, (uint)Number);
        }
    }
    
    public class GetRoomChatInfoP : IUnPackable
    {
        public List<RoomChatInfo> Infos;
        
        public const uint Sid = 35;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Infos = new List<RoomChatInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new RoomChatInfo();
                var1.UnPack(stream);
                Infos.Add(var1);
            }
        }
    }
    
    public struct SearchRoomQ : IServerCallbackable
    {
        // 类型
        public int Type;
        // 每页数量
        public int Number;
        // 第几页
        public int Page;
        
        public uint UnPackableId => 36;
        public uint PackableId => 55;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 55u);
            PackAuxiliary.Write(stream, (uint)Type);
            PackAuxiliary.Write(stream, (uint)Number);
            PackAuxiliary.Write(stream, (uint)Page);
        }
    }
    
    public class SearchRoomP : IUnPackable
    {
        public List<RoomSearchInfo> Rooms;
        
        public const uint Sid = 36;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Rooms = new List<RoomSearchInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new RoomSearchInfo();
                var1.UnPack(stream);
                Rooms.Add(var1);
            }
        }
    }
    
    public enum JoinRoomResult
    {
        Success,
        // 重复加入
        Again,
        // 人满
        Full,
        // 房间不存在了
        Invalid,
    }
    
    public struct JoinRoomQ : IServerCallbackable
    {
        public int RoomId;
        
        public uint UnPackableId => 37;
        public uint PackableId => 56;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 56u);
            PackAuxiliary.Write(stream, (uint)RoomId);
        }
    }
    
    public struct JoinRoomP : IUnPackable
    {
        public JoinRoomResult Result;
        
        public const uint Sid = 37;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (JoinRoomResult)var0;
        }
    }
    
    public class NoticeJoinRoomP : IUnPackable
    {
        public int RoomId;
        public string Name;
        
        public const uint Sid = 38;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out Name);
        }
    }
    
    public enum RoomStrOption
    {
        // 名字
        Name,
        // 宣言
        Describe,
    }
    
    public class ChangeRoomStrOptionQ : IServerCallbackable
    {
        public int RoomId;
        public RoomStrOption Option;
        public string Value;
        
        public uint UnPackableId => 40;
        public uint PackableId => 57;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 57u);
            PackAuxiliary.Write(stream, (uint)RoomId);
            PackAuxiliary.Write(stream, (uint)Option);
            PackAuxiliary.Write(stream, Value);
        }
    }
    
    public class NoticeChgRoomStrOpP : IUnPackable
    {
        public int RoomId;
        public RoomStrOption Option;
        public string Value;
        
        public const uint Sid = 39;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Option = (RoomStrOption)var1;
            UnPackAuxiliary.Read(stream, out Value);
        }
    }
    
    public enum ChgStrOptionResult
    {
        Success,
        // 字符串太短或则太长
        InvalidValue,
        // 没有权限
        NoPower,
    }
    
    public struct ChangeRoomStrOptionP : IUnPackable
    {
        public ChgStrOptionResult Result;
        
        public const uint Sid = 40;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (ChgStrOptionResult)var0;
        }
    }
    
    public enum RoomNumOption
    {
        // 头像
        Head,
        // 群组分类
        Type,
        // 时间(通过BuyTime协议修改,NoticeChgRoomNumOpP通知) 
        Time,
        // 标签分类,BitArray
        Tags,
    }
    
    public struct ChangeRoomNumOptionQ : IServerCallbackable
    {
        public int RoomId;
        public RoomNumOption Option;
        public int Value;
        
        public uint UnPackableId => 41;
        public uint PackableId => 58;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 58u);
            PackAuxiliary.Write(stream, (uint)RoomId);
            PackAuxiliary.Write(stream, (uint)Option);
            PackAuxiliary.Write(stream, (uint)Value);
        }
    }
    
    public enum ChgRoomNumOptionR
    {
        Success,
        NoPower,
    }
    
    public struct ChangeRoomNumOptionP : IUnPackable
    {
        public ChgRoomNumOptionR Result;
        
        public const uint Sid = 41;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (ChgRoomNumOptionR)var0;
        }
    }
    
    public class NoticeChgRoomNumOpP : IUnPackable
    {
        public int RoomId;
        public RoomNumOption Option;
        public int Value;
        
        public const uint Sid = 42;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Option = (RoomNumOption)var1;
            UnPackAuxiliary.Read(stream, out uint var2);
            Value = (int)var2;
        }
    }
    
    public enum BuyTimeResult
    {
        Success,
        NoPower,
        // 钱不够
        MoneyLess,
        // 不在购买时间段内
        NotInByTime,
    }
    
    public struct BuyTimeQ : IServerCallbackable
    {
        public int RoomId;
        
        public uint UnPackableId => 43;
        public uint PackableId => 59;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 59u);
            PackAuxiliary.Write(stream, (uint)RoomId);
        }
    }
    
    public struct BuyTimeP : IUnPackable
    {
        public BuyTimeResult Result;
        
        public const uint Sid = 43;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (BuyTimeResult)var0;
        }
    }
    
    // 向服务器发送消息时,如果房间已经不存在了或则消失了,则会通过这条消息通知客户端
    public struct NoticeRoomNotExistsP : IUnPackable
    {
        public int RoomId;
        
        public const uint Sid = 44;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
        }
    }
    
    public struct GetActivityRewardQ : IServerCallbackable
    {
        public int RoomId;
        public int Level;
        
        public uint UnPackableId => 45;
        public uint PackableId => 60;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 60u);
            PackAuxiliary.Write(stream, (uint)RoomId);
            PackAuxiliary.Write(stream, (uint)Level);
        }
    }
    
    public enum GetActivityRewardR
    {
        Success,
        //不是这个群组的
        NotMember,
        //重复领取
        Again,
        //当前等级不可领取
        NoReward,
    }
    
    public struct GetActivityRewardP : IUnPackable
    {
        public GetActivityRewardR Result;
        
        public const uint Sid = 45;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (GetActivityRewardR)var0;
        }
    }
    
    public struct ExitRoomQ : IIdPackable
    {
        public int RoomId;
        
        public uint PackableId => 61;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 61u);
            PackAuxiliary.Write(stream, (uint)RoomId);
        }
    }
    
    // 退群成功
    public struct NoticeExitRoomSuccP : IUnPackable
    {
        public int RoomId;
        
        public const uint Sid = 46;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
        }
    }
    
    public class NoticeExitP : IUnPackable
    {
        public int RoomId;
        public string Name;
        
        public const uint Sid = 47;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out Name);
        }
    }
    
    // 群信息
    public class RoomInfo : IUnPackable
    {
        public int RoomId;
        public int Head;
        public int Type;
        // 当前最后一条群消息的Id(0代表没有消息)
        public int MessageId;
        public long Owner;
        public string Name;
        public BitVector32 Tags;
        public string Describe;
        // 群人数
        public int MemberNum;
        // 总人数
        public int MemberLimit;
        // 总活跃度
        public int TotalActivity;
        // 存活时间
        public int LifeTime;
        // 加入时间
        public int JoinTime;
        // 领奖记录
        public BitVector32 RewardRecord;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Head = (int)var1;
            UnPackAuxiliary.Read(stream, out uint var2);
            Type = (int)var2;
            UnPackAuxiliary.Read(stream, out uint var3);
            MessageId = (int)var3;
            UnPackAuxiliary.Read(stream, out ulong var4);
            Owner = (long)var4;
            UnPackAuxiliary.Read(stream, out Name);
            UnPackAuxiliary.Read(stream, out Tags);
            UnPackAuxiliary.Read(stream, out Describe);
            UnPackAuxiliary.Read(stream, out uint var5);
            MemberNum = (int)var5;
            UnPackAuxiliary.Read(stream, out uint var6);
            MemberLimit = (int)var6;
            UnPackAuxiliary.Read(stream, out uint var7);
            TotalActivity = (int)var7;
            UnPackAuxiliary.Read(stream, out uint var8);
            LifeTime = (int)var8;
            UnPackAuxiliary.Read(stream, out uint var9);
            JoinTime = (int)var9;
            UnPackAuxiliary.Read(stream, out RewardRecord);
        }
    }
    
    public struct GetRoomInfoQ : IServerCallbackable
    {
        public int RoomId;
        
        public uint UnPackableId => 48;
        public uint PackableId => 62;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 62u);
            PackAuxiliary.Write(stream, (uint)RoomId);
        }
    }
    
    public class GetRoomInfoP : IUnPackable
    {
        public RoomInfo Info;
        
        public const uint Sid = 48;
        
        public void UnPack(MemoryStream stream)
        {
            Info = new RoomInfo();
            Info.UnPack(stream);
        }
    }
    
    public class SendRoomMsgQ : IIdPackable
    {
        public int RoomId;
        public string Content;
        
        public uint PackableId => 63;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 63u);
            PackAuxiliary.Write(stream, (uint)RoomId);
            PackAuxiliary.Write(stream, Content);
        }
    }
    
    public class NoticeRoomMsgP : IUnPackable
    {
        public int RoomId;
        public RoomChatInfo Info;
        
        public const uint Sid = 49;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            Info = new RoomChatInfo();
            Info.UnPack(stream);
        }
    }
    
    public class FriendChatInfo : IUnPackable
    {
        public string Info;
        public int Time;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out Info);
            UnPackAuxiliary.Read(stream, out uint var0);
            Time = (int)var0;
        }
    }
    
    public struct GetFriendOfflineChatInfoQ : IServerCallbackable
    {
        // 好友Id
        public long FriendId;
        
        public uint UnPackableId => 50;
        public uint PackableId => 64;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 64u);
            PackAuxiliary.Write(stream, (ulong)FriendId);
        }
    }
    
    public class GetFriendOfflineChatInfoP : IUnPackable
    {
        public List<FriendChatInfo> Infos;
        
        public const uint Sid = 50;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Infos = new List<FriendChatInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new FriendChatInfo();
                var1.UnPack(stream);
                Infos.Add(var1);
            }
        }
    }
    
    public class GetFriendOfflineChatAckQ : IIdPackable
    {
        // 好友Id
        public long FriendId;
        
        public uint PackableId => 65;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 65u);
            PackAuxiliary.Write(stream, (ulong)FriendId);
        }
    }
    
    public enum SendChatInfoResult
    {
        Success,
        // 不是好友
        NotFriend,
        // 对方在你的黑名单中
        TargetInBlack,
        // 你在对方黑名单中
        InBlack,
    }
    
    public class SendChatInfoQ : IServerCallbackable
    {
        public long PlayerId;
        public string Info;
        
        public uint UnPackableId => 51;
        public uint PackableId => 66;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 66u);
            PackAuxiliary.Write(stream, (ulong)PlayerId);
            PackAuxiliary.Write(stream, Info);
        }
    }
    
    public struct SendChatInfoP : IUnPackable
    {
        public SendChatInfoResult Result;
        
        public const uint Sid = 51;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (SendChatInfoResult)var0;
        }
    }
    
    public class NoticeChatInfoP : IUnPackable
    {
        // 好友Id
        public long FriendId;
        public FriendChatInfo Info;
        
        public const uint Sid = 52;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out ulong var0);
            FriendId = (long)var0;
            Info = new FriendChatInfo();
            Info.UnPack(stream);
        }
    }
    
    // Npc聊天节点信息同步
    public class SyncNpcChatNodeIdQ : IIdPackable
    {
        public int NpcId;
        public int NodeId;
        
        public uint PackableId => 67;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 67u);
            PackAuxiliary.Write(stream, (uint)NpcId);
            PackAuxiliary.Write(stream, (uint)NodeId);
        }
    }
    
    // 聊天Npc信息
    public class ChatNpcInfo : IUnPackable
    {
        public int NpcId;
        public string Tree;
        public int NodeId;
        public int OfflineTime;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            NpcId = (int)var0;
            UnPackAuxiliary.Read(stream, out Tree);
            UnPackAuxiliary.Read(stream, out uint var1);
            NodeId = (int)var1;
            UnPackAuxiliary.Read(stream, out uint var2);
            OfflineTime = (int)var2;
        }
    }
    
    // 朋友圈内容
    public class FriendCircleInfo : IUnPackable
    {
        // 玩家Id
        public long PlayerId;
        // 内容
        public string Content;
        // 发送时间
        public int Time;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out ulong var0);
            PlayerId = (long)var0;
            UnPackAuxiliary.Read(stream, out Content);
            UnPackAuxiliary.Read(stream, out uint var1);
            Time = (int)var1;
        }
    }
    
    public struct GetFriendCircleQ : IServerCallbackable
    {
        // 截至时间
        public int Time;
        // 偏移量
        public int Offset;
        // 个数
        public int Number;
        
        public uint UnPackableId => 53;
        public uint PackableId => 68;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 68u);
            PackAuxiliary.Write(stream, (uint)Time);
            PackAuxiliary.Write(stream, (uint)Offset);
            PackAuxiliary.Write(stream, (uint)Number);
        }
    }
    
    public class GetFriendCircleP : IUnPackable
    {
        // 数量不足Number个时,代表没有后续了, 注意结果是倒序的
        public List<FriendCircleInfo> Infos;
        
        public const uint Sid = 53;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Infos = new List<FriendCircleInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new FriendCircleInfo();
                var1.UnPack(stream);
                Infos.Add(var1);
            }
        }
    }
    
    // 发送朋友圈内容
    public class SendFriendCircleQ : IIdPackable
    {
        public string Content;
        
        public uint PackableId => 69;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 69u);
            PackAuxiliary.Write(stream, Content);
        }
    }
    
    public struct NoticeNewTrendP : IUnPackable
    {
        
        public const uint Sid = 54;
        
        public void UnPack(MemoryStream stream)
        {
        }
    }
    
    public struct GetBarrageQ : IServerCallbackable
    {
        public int Version;
        
        public uint UnPackableId => 55;
        public uint PackableId => 70;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 70u);
            PackAuxiliary.Write(stream, (uint)Version);
        }
    }
    
    public class BarrageInfo : IPackable, IUnPackable
    {
        public int ShapeId;
        public string Barrage;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, (uint)ShapeId);
            PackAuxiliary.Write(stream, Barrage);
        }
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            ShapeId = (int)var0;
            UnPackAuxiliary.Read(stream, out Barrage);
        }
    }
    
    public class GetBarrageP : IUnPackable
    {
        public int Version;
        // 新增加的
        public List<BarrageInfo> Barrages;
        
        public const uint Sid = 55;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Version = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Barrages = new List<BarrageInfo>((int)var1);
            for(var i = 0; i < var1; ++i)
            {
                var var2 = new BarrageInfo();
                var2.UnPack(stream);
                Barrages.Add(var2);
            }
        }
    }
    
    public class LaunchBarrageQ : IIdPackable
    {
        public BarrageInfo Info;
        
        public uint PackableId => 71;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 71u);
            Info.Pack(stream);
        }
    }
    
    public struct HitRewardQ : IServerCallbackable
    {
        
        public uint UnPackableId => 56;
        public uint PackableId => 72;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 72u);
        }
    }
    
    public struct HitRewardP : IUnPackable
    {
        public int Diamond;
        
        public const uint Sid = 56;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Diamond = (int)var0;
        }
    }
    
    public struct HitNoneQ : IIdPackable
    {
        
        public uint PackableId => 73;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 73u);
        }
    }
    
    public struct GetChatInfoQ : IServerCallbackable
    {
        
        public uint UnPackableId => 57;
        public uint PackableId => 74;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 74u);
        }
    }
    
    public class GetChatInfoP : IUnPackable
    {
        // 聊天室
        public List<int> Rooms;
        // 弹幕剩余次数
        public int BarrageCount;
        // 朋友圈次数
        public int CircleTimes;
        
        public const uint Sid = 57;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.ReadUsAsIs(stream, out Rooms);
            UnPackAuxiliary.Read(stream, out uint var0);
            BarrageCount = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            CircleTimes = (int)var1;
        }
    }
    
    // 邀请加入群
    public struct InviteInRoomQ : IServerCallbackable
    {
        public long PlayerId;
        public int RoomId;
        
        public uint UnPackableId => 58;
        public uint PackableId => 75;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 75u);
            PackAuxiliary.Write(stream, (ulong)PlayerId);
            PackAuxiliary.Write(stream, (uint)RoomId);
        }
    }
    
    public struct InviteInRoomP : IUnPackable
    {
        // 邀请Id 0代表失败
        public int InvitedId;
        
        public const uint Sid = 58;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            InvitedId = (int)var0;
        }
    }
    
    // 加群邀请时的群摘要
    public class InviteRoomSummary : IUnPackable
    {
        public int RoomId;
        public int Head;
        public string Name;
        // 数据库内时间,可能存在几分钟的数据不一致
        public int LifeTime;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RoomId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Head = (int)var1;
            UnPackAuxiliary.Read(stream, out Name);
            UnPackAuxiliary.Read(stream, out uint var2);
            LifeTime = (int)var2;
        }
    }
    
    // 邀请好友的状态
    public enum InviteState
    {
        // 对方未处理
        UnRead,
        // 接受
        Accept,
        // 拒绝
        Refuse,
    }
    
    // 邀请信息
    public class InviteInfo : IUnPackable
    {
        // 邀请Id
        public int InvitedId;
        // 对方Id
        public long PlayerId;
        // 对方头像
        public int PlayerHead;
        // 对方名称
        public string PlayerName;
        // 玩家是否是邀请者
        public bool IsInviter;
        // 时间
        public int Time;
        // 状态 只对邀请方有用
        public InviteState State;
        // 有这个字段就是群邀请,否则就是好友邀请
        public InviteRoomSummary RoomSummary;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            InvitedId = (int)var0;
            UnPackAuxiliary.Read(stream, out ulong var1);
            PlayerId = (long)var1;
            UnPackAuxiliary.Read(stream, out uint var2);
            PlayerHead = (int)var2;
            UnPackAuxiliary.Read(stream, out PlayerName);
            UnPackAuxiliary.Read(stream, out IsInviter);
            UnPackAuxiliary.Read(stream, out uint var3);
            Time = (int)var3;
            UnPackAuxiliary.Read(stream, out uint var4);
            State = (InviteState)var4;
            UnPackAuxiliary.Read(stream, out bool var5);
            if(var5)
            {
                RoomSummary = new InviteRoomSummary();
                RoomSummary.UnPack(stream);
            }
        }
    }
    
    public class NoticeInviteP : IUnPackable
    {
        public InviteInfo Info;
        
        public const uint Sid = 59;
        
        public void UnPack(MemoryStream stream)
        {
            Info = new InviteInfo();
            Info.UnPack(stream);
        }
    }
    
    // 获取邀请信息
    public struct GetInviteInfoQ : IServerCallbackable
    {
        public int Offset;
        public int Number;
        public int Time;
        
        public uint UnPackableId => 60;
        public uint PackableId => 76;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 76u);
            PackAuxiliary.Write(stream, (uint)Offset);
            PackAuxiliary.Write(stream, (uint)Number);
            PackAuxiliary.Write(stream, (uint)Time);
        }
    }
    
    public class GetInviteInfoP : IUnPackable
    {
        public List<InviteInfo> InviteInfos;
        
        public const uint Sid = 60;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            InviteInfos = new List<InviteInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new InviteInfo();
                var1.UnPack(stream);
                InviteInfos.Add(var1);
            }
        }
    }
    
    // 邀请方在对方拒绝/同意后的已读确认
    public struct InviterInfoAckQ : IIdPackable
    {
        // 邀请Id
        public int InvitedId;
        
        public uint PackableId => 77;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 77u);
            PackAuxiliary.Write(stream, (uint)InvitedId);
        }
    }
    
    // 回复群邀请
    public struct RepRoomInviteQ : IIdPackable
    {
        // 邀请Id
        public int InvitedId;
        public bool Accept;
        
        public uint PackableId => 78;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 78u);
            PackAuxiliary.Write(stream, (uint)InvitedId);
            PackAuxiliary.Write(stream, Accept);
        }
    }
    
    // 是否有未读的邀请
    public struct HasUnReadInviteQ : IServerCallbackable
    {
        
        public uint UnPackableId => 61;
        public uint PackableId => 79;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 79u);
        }
    }
    
    public struct HasUnReadInviteP : IUnPackable
    {
        public bool Has;
        
        public const uint Sid = 61;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out Has);
        }
    }
    
    public struct GetNpcChatInfoQ : IServerCallbackable
    {
        
        public uint UnPackableId => 62;
        public uint PackableId => 80;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 80u);
        }
    }
    
    public class GetNpcChatInfoP : IUnPackable
    {
        public List<ChatNpcInfo> Infos;
        
        public const uint Sid = 62;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Infos = new List<ChatNpcInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new ChatNpcInfo();
                var1.UnPack(stream);
                Infos.Add(var1);
            }
        }
    }
    
    public class SendGiftToNpcQ : IIdPackable
    {
        public int GiftId;
        
        public uint PackableId => 81;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 81u);
            PackAuxiliary.Write(stream, (uint)GiftId);
        }
    }
    
    // 最近联系人类型
    public enum RecentContactType
    {
        Room,
        Player,
        Npc,
    }
    
    // 最近联系人信息
    public class RecentContactInfo : IUnPackable
    {
        public string Name;
        public int Head;
        public RecentContactType Type;
        // PlayerId、RoomId、NpcId
        public long Id;
        public int Time;
        public string Message;
        // 群存活时间,只有群有用
        public int LifeTime;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out Name);
            UnPackAuxiliary.Read(stream, out uint var0);
            Head = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Type = (RecentContactType)var1;
            UnPackAuxiliary.Read(stream, out ulong var2);
            Id = (long)var2;
            UnPackAuxiliary.Read(stream, out uint var3);
            Time = (int)var3;
            UnPackAuxiliary.Read(stream, out Message);
            UnPackAuxiliary.Read(stream, out uint var4);
            LifeTime = (int)var4;
        }
    }
    
    public struct GetRecentContactInfoQ : IServerCallbackable
    {
        
        public uint UnPackableId => 63;
        public uint PackableId => 82;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 82u);
        }
    }
    
    public class GetRecentContactInfoP : IUnPackable
    {
        public List<RecentContactInfo> Infos;
        
        public const uint Sid = 63;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Infos = new List<RecentContactInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new RecentContactInfo();
                var1.UnPack(stream);
                Infos.Add(var1);
            }
        }
    }
    
    public enum ChatEnum
    {
        GetSystemNoticeP,
        NoticeNewNotieceP,
        GetRoomChatInfoP,
        SearchRoomP,
        JoinRoomP,
        NoticeJoinRoomP,
        NoticeChgRoomStrOpP,
        ChangeRoomStrOptionP,
        ChangeRoomNumOptionP,
        NoticeChgRoomNumOpP,
        BuyTimeP,
        NoticeRoomNotExistsP,
        GetActivityRewardP,
        NoticeExitRoomSuccP,
        NoticeExitP,
        GetRoomInfoP,
        NoticeRoomMsgP,
        GetFriendOfflineChatInfoP,
        SendChatInfoP,
        NoticeChatInfoP,
        GetFriendCircleP,
        NoticeNewTrendP,
        GetBarrageP,
        HitRewardP,
        GetChatInfoP,
        InviteInRoomP,
        NoticeInviteP,
        GetInviteInfoP,
        HasUnReadInviteP,
        GetNpcChatInfoP,
        GetRecentContactInfoP,
    }
}
